cmake_minimum_required(VERSION 3.0)
project(block_cipher)
set(CMAKE_VERBOSE_MAKEFILE 1)

set(CMAKE_BUILD_TYPE "Debug")
#set(CMAKE_BUILD_TYPE "Release")

set(TARGET_LIB_NAME block_cipher)

if (WIN32)
add_definitions(-DWINDOWS)
else()
add_definitions(-DLINUX)
endif()

add_definitions(-fPIC)

set(SRC_FILES
    xor16.cpp
    cb_cipher.cpp
    ecb_mode.cpp
    cbc_mode.cpp
    ctr_mode.cpp
    fb_mode.cpp
    gcm_mode.cpp
)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)

add_library(${TARGET_LIB_NAME} STATIC ${SRC_FILES})
